home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
User's Choice Windows CD
/
User's Choice Windows CD (CMS Software)(1993).iso
/
win_a_d
/
dyndlg.zip
/
DYNDLG.C
next >
Wrap
Text File
|
1992-07-21
|
2KB
|
75 lines
//*-------------------------------------------------------------------------
//| Title:
//| DynDlg.C
//|
//| Contents:
//| WinMain()
//| DoMain()
//*-------------------------------------------------------------------------
#include <WINDOWS.H>
#include "DynDlg.H"
#include "INITPROC.H"
#include "WNDPROC.H"
//*-------------------------------------------------------------------------
//| Title:
//| WinMain
//|
//| Parameters:
//| hInstance - Integer which uniquely identifies this instance
//| of the application (hInstance > 0)
//| hPrevInstance - Integer identifier of a previous instance of the
//| application (hPrevInstance == NULL if no
//| previous instance exists)
//| lpszCmdLine - Long pointer to command line info
//| nCmdShow - Integer value specifying how to start app.,
//| (Iconic [7] or Normal [1,5])
//*-------------------------------------------------------------------------
int PASCAL WinMain ( HANDLE hInstance,
HANDLE hPrevInstance,
LPSTR lpszCmdLine,
int nCmdShow)
{
int iResult;
if (InitApplication(hInstance, hPrevInstance))
if (InitInstance(hInstance, nCmdShow))
iResult = DoMain();
return iResult;
}
//*------------------------------------------------------------------------
//| Title:
//| DoMain
//|
//| Parameters:
//| None
//|
//| Purpose:
//| This is the main message loop for the application. It retrieves
//| messages from the application's message queue, and dispatches
//| the messages to the appropriate window procedure(s).
//*------------------------------------------------------------------------
int DoMain(void)
{
MSG msg;
while (GetMessage( &msg, // message structure
NULL, // handle of window receiving the message
NULL, // lowest message to examine
NULL)) // highest message to examine
{
TranslateMessage(&msg); // Translates virtual key codes
DispatchMessage(&msg); // Dispatches message to window procedure
}
return ((int) msg.wParam); // Returns the value from PostQuitMessage
}